package com.zkjl.protect_business.entity;

import com.zkjl.protect_business.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

/**
 * 通知实体
 **/
@Data
@ApiModel(value = "File对象", description = "文件对象")
@Document(indexName = "pb_file", shards = 1, replicas = 0)
public class PBFile extends BaseEntity {

    @Id
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "文件名称")
    private String name;

    @ApiModelProperty(value = "路径")
    private String path;

    @ApiModelProperty(value = "是否允许下载")
    private Boolean isDownload = true;

    @ApiModelProperty(value = "hash值，确保同一个文件只上传一次")
    private String hash;

    @ApiModelProperty(notes = "类型 word excel")
    private String type;

    @ApiModelProperty(notes = "包含字段")
    private List<DocField> fields;

}
